#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using System.Collections.Specialized;
using Xfinity.Engine.Plugins;
#endregion

namespace Xfinity.Engine.Plugins
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public partial class ParticleSystemManager : Microsoft.Xna.Framework.GameComponent
    {
        List<ParticleSystem> systems;
        public ParticleSystemManager(Game game, int numberOfSystems, int numberOfParticles, Camera camera)
            : base(game)
        {
            systems = new List<ParticleSystem>(numberOfSystems);
            for (int i = 0; i < systems.Count; i++)
            {
                systems[i] = new ParticleSystem(game, numberOfParticles, camera);
                Game.Components.Add(systems[i]);
            }
        }


        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            // TODO: Add your initialization code here

            base.Initialize();
        }

        public ParticleSystem SpawnNewParticleSystem(int numOfParticles, float maxAge)
        {
            return new ParticleSystem(Game, numOfParticles, new Camera(Game));
        }

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {/*
            for (int i = 0; i < systems.Count; i++)
            {
                
            }*/

            base.Update(gameTime);
        }
    }
}


